package com.zhumei.keyscale.widget;

import androidx.recyclerview.widget.*;
import android.content.*;
import android.util.*;
import android.view.*;

public class FocusRecyclerView extends RecyclerView
{
    public FocusRecyclerView(final Context context) {
        super(context);
    }
    
    public FocusRecyclerView(final Context context, final AttributeSet set) {
        super(context, set);
    }
    
    public FocusRecyclerView(final Context context, final AttributeSet set, final int n) {
        super(context, set, n);
    }
    
    public boolean dispatchKeyEvent(final KeyEvent keyEvent) {
        Label_0128: {
            if (keyEvent.getAction() != 0) {
                break Label_0128;
            }
            final int keyCode = keyEvent.getKeyCode();
            if (keyCode != 21 && keyCode != 22) {
                break Label_0128;
            }
            final View focusedChild = this.getFocusedChild();
            Label_0091: {
                if (keyCode != 21) {
                    break Label_0091;
                }
            Label_0114_Outer:
                while (true) {
                    while (true) {
                        try {
                            Log.v("left", "\u7126\u70b9\u5f80\u5de6\u8dd1");
                            View view;
                            if ((view = FocusFinder.getInstance().findNextFocus((ViewGroup)this, focusedChild, 17)) == null) {
                                Log.v("\u540c\u7ea7", "View\u67e5\u627e");
                                view = focusedChild.getParent().focusSearch(focusedChild, 17);
                            }
                            while (true) {
                                if (view == null) {
                                    focusedChild.requestFocus();
                                    return true;
                                }
                                return super.dispatchKeyEvent(keyEvent);
                                view = null;
                                continue Label_0114_Outer;
                                Log.v("right", "\u53f3\u8fb9\u8dd1");
                                view = FocusFinder.getInstance().findNextFocus((ViewGroup)this, focusedChild, 66);
                                continue Label_0114_Outer;
                            }
                        }
                        catch (Exception ex) {}
                        continue;
                    }
                }
            }
        }
    }
    
    public View focusSearch(final int n) {
        return super.focusSearch(n);
    }
}
